{extend name="admin/base"}
{block name="breadcrumb"}
<div class="page-breadcrumbs">
    <ul class="breadcrumb">
        <li>
            <a href="#">文章管理</a>
        </li>
        <li class="active">文章列表</li>
    </ul>
</div>
{/block}
<!-- /Page Breadcrumb -->
<!-- Page Body -->
{block name="pagebody"}
<div class="page-body">

    <button type="button" tooltip="添加文章" class="btn btn-sm btn-azure btn-addon" onClick="javascript:window.location.href = '{:url('article/add')}'"> <i class="fa fa-plus"></i> Add
    </button>
    <div class="row">
        <div class="col-lg-12 col-sm-12 col-xs-12">
            <div class="widget">
                <div class="widget-body">
                    <div class="flip-scroll">
                        <table class="table table-bordered table-hover" style="　table-layout:fixed;">
                            <thead class="">
                            <tr>
                                <th class="text-center">ID</th>
                                <th class="text-center">文章标题</th>
                                <th class="text-center">文章简介</th>
                                <th class="text-center">文章作者</th>
                                <th class="text-center">图片</th>
                                <th class="text-center">标签</th>
                                <th class="text-center">栏目</th>
                                <th class="text-center">是否推荐</th>
                                <th class="text-center">日期</th>
                                <th class="text-center">操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            {volist name="res" id="vo"}
                            <tr>
                                <td align="center">{$vo.artid}</td>
                                <td align="center">{$vo.arttitle}</td>
                                <td align="center" style="width:20%;">{$vo.desc}</td>
                                <td align="center">{$vo.author}</td>
                                <td align="center">{$vo.pic}</td>
                                <td align="center">{$vo.tag}</td>
                                <td align="center">{$vo.catas.cataname}</td>
                                <td align="center">{if condition="$vo.state == 0"}推荐{else /}不推荐{/if}</td>
                                <td align="center">{$vo.time}</td>
                                <td align="center">
                                    <a href="{:url('article/edit',array('id'=>$vo.artid))}" class="btn btn-primary btn-sm shiny">
                                        <i class="fa fa-edit"></i> 编辑
                                    </a>
                                    <a href="#" onClick="warning('确实要删除吗', '{:url('article/del',array('id'=>$vo.artid))}')" class="btn btn-danger btn-sm shiny">
                                        <i class="fa fa-trash-o"></i> 删除
                                    </a>
                                </td>
                            </tr>
                            {/volist}
                            </tbody>
                        </table>
                    </div>
                    <div style="text-align:center; margin-top:10px;">
                        {$res->render()}
                    </div>
                </div>
            </div>
        </div>
    </div>

</div>
{/block}



